﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="http://localhost:8080/testA/arcgisjs/js/dojo/dijit/themes/tundra/tundra.css" />
    <script type="text/javascript" src="http://localhost:8080/testA/arcgisjs/init.js"></script>
    <script type="text/javascript" src="arcgisjs/jsapi_vsdoc12_v38.js"></script>
    <link rel="stylesheet" type="text/css" href="http://localhost:8080/testA/arcgisjs/js/esri/css/esri.css" />
    <script>
        dojo.require("esri.map");
        var myMap;
        function init() {
          //  myMap = new esri.Map("map1",{logo:true});
            myMap = new esri.Map("arcgisDiv");
            var myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://cache1.arcgisonline.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer");
            myMap.addLayer(myTiledMapServiceLayer);
            myMap.setZoom(4);
            var div1 = dojo.byId("div1");
            var div2 = dojo.byId("div2");
            dojo.connect(myMap, "onMouseMove", function (e) {
                var mp = e.mapPoint;
                var sp = e.screenPoint;
                div1.innerHTML = mp.x + "/" + sp.x;
                div2.innerHTML = mp.y + "/" + sp.y;
            });
            
        }

        dojo.addOnLoad(init)
    </script>
</head>
<body>
    <div id="arcgisDiv" style=" width:900px; height:500px"></div>
    <div id="div1"></div>
    <div id="div2"></div>
</body>
</html>
